package com.huitone.smspfm.socket.core.handler;


import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import com.huitone.smspfm.socket.core.net.ExtSocket;
import com.huitone.smspfm.socket.protocol.sgip.message.Message;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.ActiveTest;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.ActiveTestResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.BindResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Deliver;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.DeliverResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Report;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Report2;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Report2Resp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.ReportResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Submit;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Submit2;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.Submit2Resp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.SubmitResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.UnBind;
import com.huitone.smspfm.socket.protocol.sgip.message.msgbody.UnBindResp;
import com.huitone.smspfm.socket.protocol.sgip.message.msghead.Head;

public class DefaultMessageHandler extends AbstractMessageHandler {
	
	private static final Logger logger = LogManager.getLogger(DefaultMessageHandler.class);
	
	@Override
	public void handleBindRespMessage(Head head, BindResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleSubmitMessage(Head head, Submit body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleSubmitRespMessage(Head head, SubmitResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleDeliverMessage(Head head, Deliver body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleDeliverRespMessage(Head head, DeliverResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleReportMessage(Head head, Report body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleReportRespMessage(Head head, ReportResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleUnBindMessage(Head head, UnBind body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleUnBindRespMessage(Head head, UnBindResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleActiveTestMessage(Head head, ActiveTest body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleActiveTestRespMessage(Head head, ActiveTestResp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleSubmit2Message(Head head, Submit2 body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleSubmit2RespMessage(Head head, Submit2Resp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleReport2Message(Head head, Report2 body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}

	@Override
	public void handleReport2RespMessage(Head head, Report2Resp body, ExtSocket socket) {
		logger.info(new Message(head, body).toString());
	}
}
